﻿using DLL.NET50.DB.MS.DrugBackup.Context;
using DLL.NET50.DB.MS.Entity;
using DLL.NET50.JSON;
using Microsoft.EntityFrameworkCore;
using System;

namespace DLL.NET50.DB.MS.Server.Context
{

        public class CMSServerDrugsContext: CMSSaveDrugsContext
        {
            public CMSServerDrugsContext(DbContextOptions<CMSSaveDrugsContext> options)
             : base(options)
            {

            }
            protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
            {
                if (!optionsBuilder.IsConfigured)
                {
                    string efCopyStr = AppConfigurtaionServices.Configuration.GetSection("ConnectionStrings").GetSection("EFServerStr").Value;
                    optionsBuilder.UseMySQL(efCopyStr);

                }
            }
        }
   
}
